\(\int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx\) [169]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 43 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {i (a-i a \tan (c+d x))^4}{8 d \left (a^3+i a^3 \tan (c+d x)\right )^4} \]

[Out]

1/8*I*(a-I*a*tan(d*x+c))^4/d/(a^3+I*a^3*tan(d*x+c))^4

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 37} \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {i (a-i a \tan (c+d x))^4}{8 d \left (a^3+i a^3 \tan (c+d x)\right )^4} \]

[In]

Int[Sec[c + d*x]^8/(a + I*a*Tan[c + d*x])^8,x]

[Out]

((I/8)*(a - I*a*Tan[c + d*x])^4)/(d*(a^3 + I*a^3*Tan[c + d*x])^4)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {i \text {Subst}\left (\int \frac {(a-x)^3}{(a+x)^5} \, dx,x,i a \tan (c+d x)\right )}{a^7 d} \\ & = \frac {i (a-i a \tan (c+d x))^4}{8 d \left (a^3+i a^3 \tan (c+d x)\right )^4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.84 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {i (i+\tan (c+d x))^4}{8 a^8 d (-i+\tan (c+d x))^4} \]

[In]

Integrate[Sec[c + d*x]^8/(a + I*a*Tan[c + d*x])^8,x]

[Out]

((I/8)*(I + Tan[c + d*x])^4)/(a^8*d*(-I + Tan[c + d*x])^4)

Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.44

method result size
risch \(\frac {i {\mathrm e}^{-8 i \left (d x +c \right )}}{8 a^{8} d}\) \(19\)
derivativedivides \(-\frac {-\frac {2 i}{\left (\tan \left (d x +c \right )-i\right )^{4}}+\frac {3 i}{\left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {1}{\tan \left (d x +c \right )-i}-\frac {4}{\left (\tan \left (d x +c \right )-i\right )^{3}}}{a^{8} d}\) \(62\)
default \(-\frac {-\frac {2 i}{\left (\tan \left (d x +c \right )-i\right )^{4}}+\frac {3 i}{\left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {1}{\tan \left (d x +c \right )-i}-\frac {4}{\left (\tan \left (d x +c \right )-i\right )^{3}}}{a^{8} d}\) \(62\)

[In]

int(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^8,x,method=_RETURNVERBOSE)

[Out]

1/8*I/a^8/d*exp(-8*I*(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.40 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\frac {i \, e^{\left (-8 i \, d x - 8 i \, c\right )}}{8 \, a^{8} d} \]

[In]

integrate(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")

[Out]

1/8*I*e^(-8*I*d*x - 8*I*c)/(a^8*d)

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (34) = 68\).

Time = 8.75 (sec) , antiderivative size = 160, normalized size of antiderivative = 3.72 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=\begin {cases} \frac {i \sec ^{8}{\left (c + d x \right )}}{8 a^{8} d \tan ^{8}{\left (c + d x \right )} - 64 i a^{8} d \tan ^{7}{\left (c + d x \right )} - 224 a^{8} d \tan ^{6}{\left (c + d x \right )} + 448 i a^{8} d \tan ^{5}{\left (c + d x \right )} + 560 a^{8} d \tan ^{4}{\left (c + d x \right )} - 448 i a^{8} d \tan ^{3}{\left (c + d x \right )} - 224 a^{8} d \tan ^{2}{\left (c + d x \right )} + 64 i a^{8} d \tan {\left (c + d x \right )} + 8 a^{8} d} & \text {for}\: d \neq 0 \\\frac {x \sec ^{8}{\left (c \right )}}{\left (i a \tan {\left (c \right )} + a\right )^{8}} & \text {otherwise} \end {cases} \]

[In]

integrate(sec(d*x+c)**8/(a+I*a*tan(d*x+c))**8,x)

[Out]

Piecewise((I*sec(c + d*x)**8/(8*a**8*d*tan(c + d*x)**8 - 64*I*a**8*d*tan(c + d*x)**7 - 224*a**8*d*tan(c + d*x)
**6 + 448*I*a**8*d*tan(c + d*x)**5 + 560*a**8*d*tan(c + d*x)**4 - 448*I*a**8*d*tan(c + d*x)**3 - 224*a**8*d*ta
n(c + d*x)**2 + 64*I*a**8*d*tan(c + d*x) + 8*a**8*d), Ne(d, 0)), (x*sec(c)**8/(I*a*tan(c) + a)**8, True))

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (35) = 70\).

Time = 0.23 (sec) , antiderivative size = 158, normalized size of antiderivative = 3.67 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=-\frac {\tan \left (d x + c\right )^{6} - 3 i \, \tan \left (d x + c\right )^{5} - 4 \, \tan \left (d x + c\right )^{4} + 4 i \, \tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )^{2} - i \, \tan \left (d x + c\right )}{{\left (a^{8} \tan \left (d x + c\right )^{7} - 7 i \, a^{8} \tan \left (d x + c\right )^{6} - 21 \, a^{8} \tan \left (d x + c\right )^{5} + 35 i \, a^{8} \tan \left (d x + c\right )^{4} + 35 \, a^{8} \tan \left (d x + c\right )^{3} - 21 i \, a^{8} \tan \left (d x + c\right )^{2} - 7 \, a^{8} \tan \left (d x + c\right ) + i \, a^{8}\right )} d} \]

[In]

integrate(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")

[Out]

-(tan(d*x + c)^6 - 3*I*tan(d*x + c)^5 - 4*tan(d*x + c)^4 + 4*I*tan(d*x + c)^3 + 3*tan(d*x + c)^2 - I*tan(d*x +
 c))/((a^8*tan(d*x + c)^7 - 7*I*a^8*tan(d*x + c)^6 - 21*a^8*tan(d*x + c)^5 + 35*I*a^8*tan(d*x + c)^4 + 35*a^8*
tan(d*x + c)^3 - 21*I*a^8*tan(d*x + c)^2 - 7*a^8*tan(d*x + c) + I*a^8)*d)

Giac [A] (verification not implemented)

none

Time = 1.57 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.63 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=-\frac {2 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 7 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 7 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a^{8} d {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{8}} \]

[In]

integrate(sec(d*x+c)^8/(a+I*a*tan(d*x+c))^8,x, algorithm="giac")

[Out]

-2*(tan(1/2*d*x + 1/2*c)^7 - 7*tan(1/2*d*x + 1/2*c)^5 + 7*tan(1/2*d*x + 1/2*c)^3 - tan(1/2*d*x + 1/2*c))/(a^8*
d*(tan(1/2*d*x + 1/2*c) - I)^8)

Mupad [B] (verification not implemented)

Time = 3.97 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.70 \[ \int \frac {\sec ^8(c+d x)}{(a+i a \tan (c+d x))^8} \, dx=-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left ({\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}-\mathrm {i}\right )}{a^8\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4\,1{}\mathrm {i}+4\,{\mathrm {tan}\left (c+d\,x\right )}^3-{\mathrm {tan}\left (c+d\,x\right )}^2\,6{}\mathrm {i}-4\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \]

[In]

int(1/(cos(c + d*x)^8*(a + a*tan(c + d*x)*1i)^8),x)

[Out]

-(tan(c + d*x)*(tan(c + d*x)^2*1i - 1i))/(a^8*d*(4*tan(c + d*x)^3 - tan(c + d*x)^2*6i - 4*tan(c + d*x) + tan(c
 + d*x)^4*1i + 1i))